package com.example.springboottest.config;

import com.example.springboottest.filter.LogMdcFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfiguration {
    @Bean
    public FilterRegistrationBean registerFilter() {

        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(new LogMdcFilter());
        registration.setOrder(1);
        return registration;
    }
}
